<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link href="__ROOT__/Public/admin/css/style.css" rel="stylesheet">
<link href="__ROOT__/Public/admin/css/font-awesome.min.css" rel="stylesheet">
<link href="__ROOT__/Public/plugin/select2/select2.css" rel="stylesheet">
<script src="__ROOT__/Public/admin/laydate/laydate.js"></script>
<title>用户组列表</title>
</head>

<body>
	<div id="show">
		<div class="breadNav">
			<ul class="breadNavBar">
				<li><i class="icon-home"></i></li>
				<li><a href="#">首页</a></li>
				<li>&gt;</li>
				<li><a href="#">用户组列表</a></li>
				<li>&gt;</li>
				<li><a href="#" class="active">{$title}</a></li>
			</ul>
		</div>
		<div style="clear:both;"></div>
		<div class="filter">
			<div class="form-group" style="float:left">
		       <a href="__ROOT__/Admin/AuthManage/addGroup" class="btn btn-primary btn-lg" id="backBtn"><i class="icon-add"></i>&nbsp;添加用户组</a>
			</div>
		</div>
        <form>
		<table class="table">
			<thead>
				<tr>
					<th width="3%"></th>
				    <th width="3%">用户组编号</th>
					<th width="3%">用户组名</th>
					<th width="3%">用户组状态</th>
					<th width="60%">操作</th>
					
				</tr>
			</thead>
			<tbody id="dataInfo">
				<volist name="groupList" id="vb">
				<tr>
				  <td ><input type="checkbox" name="id[]" value="{$vb.id}"></td>
				  <td align="left">{$vb.id}</td>
				  <td align="left">{$vb.title}</td>
				  <td align="left"><if condition="$vb.status eq 1 ">启用<elseif condition="$vb.status eq 0"/>禁用</if></td>
				  <td name="de">
						<a class="btn btn-table" href="__ROOT__/Admin/AuthManage/memberList/id/{$vb.id}"><i class="icon-edit"></i>&nbsp;进入用户组</a>
						<a class="btn btn-table" href="__ROOT__/Admin/AuthManage/editGroupStatus/id/{$vb.id}"><i class="icon-edit"></i>&nbsp;编辑用户组状态</a>
						<a class="btn btn-table" href="__ROOT__/Admin/AuthManage/authList/id/{$vb.id}"><i class="icon-edit"></i>&nbsp;编辑用户组权限</a>
						<a class="btn btn-table" name="delete_single" id="{$vb.id}"><i class="icon-remove"></i>&nbsp;删除用户组</a>
				  </td>
				</volist>
				
			</tbody>
		</table>
        </form>
	</div>
	<div class="pageBarBox">
        {$page}
	</div>
</body>
<script src="__ROOT__/Public/js/jquery.min.js?ver=1.8.3"></script>
<script src="__ROOT__/Public/admin/js/main.js"></script>
<script src="__ROOT__/Public/js/titleMes.js"></script>
<script src="__ROOT__/Public/plugin/select2/select2.min.js"></script>
<script>
   $('a[name=delete_single]').click(function(){
	   var self=$(this);
	     if(confirm('确认要删除吗？')){
	    	 var v_id = $(this).attr('id');
     $.get("__ROOT__/Admin/AuthManage/deleteSingle",{id:v_id},function(data){
    	      if(data==true){
    	    	  self.parent().parent().remove();
    	      }
    	  });
            
	     }
      });
   $('a[name=delete_all]').click(function(){
	   if(confirm('确认要删除吗？')){
	   var d=$("input[type=checkbox][name='id[]']:checked");
	   var v='';
	   for(var i = 0; d && i < d.length; i++) {  
	          v += $(d[i]).val()+'@';  
	    }
	   if(v!=''){
	   $.post("__ROOT__/Admin/Member/Delete_all",{ids:v},function(data){
 	      if(data==true){
 	    	 $("input[type=checkbox][name='id[]']:checked").parent().parent().remove();
 	      }
 	  });
	   }
	   }
	  
	  
   });
   
</script>
</html>
